

(defmacro n (&rest rl))

(defun sort-list (lst)
 ()
 )


;=================================================
; test r/w lists
; in order to r/w elements with case sensitive on
; use '-modern' switch

(defun test-read-list-01 ()
 (with-open-file (in-file "test-data/list01.lsp")
  (with-standard-io-syntax
   ; read &optional input-stream signal-error-on-eof-p eof-value
   (loop while (setf x (read in-file nil nil)) do
    (format t "lst = ~a, l = ~a~%" x (length x)))
   ))
 )


;=================================================
;
(defun code-gen (dest-out-stream src-list)
 ;(print src-list dest-out-stream)
 (format dest-out-stream "list l = ~a~%" src-list)
 )

;=================================================
; test write
(defun test-write-list-01 ()
 (setf lst
  '(
      (list 'a 'b 'c)
      nil
      (defun main () (print "ads") (exit))
      ))
 (with-open-file (out-file "test-data/list02-w.lsp"
                  :direction :output    ; specify output direction
                  :if-exists :supersede ; specify overwrite-if-exists
                  )
  (with-standard-io-syntax
   (print lst out-file))))


;=================================================
;
(defun test ()
 (format t "test~%")

 (setf a 124)
 (print (eval 'a))

 ;(fwd-test)
 (code-gen *terminal-io* '(defun foo () 5))
 ;(test-read-list-01)
 ;(test-write-list-01)
 )

(defun fwd-test ()
 (format t "ads~%")
 )
